<!DOCTYPE html>
<html>
<head>
<style> 
#oMove
{
width:100px;
height:100px;
background:red;
position:relative;
animation:myfirst 5s linear 2s infinite alternate;
/* Firefox: */
-moz-animation:myfirst 5s linear 2s infinite alternate;
/* Safari and Chrome: */
-webkit-animation:myfirst 5s linear 2s infinite alternate;
/* Opera: */
-o-animation:myfirst 5s linear 2s infinite alternate;
}


@keyframes myfirst
{
0%   {background:red; left:0px; top:0px;}
25%  {background:yellow; left:200px; top:0px;}
50%  {background:blue; left:200px; top:200px;}
75%  {background:green; left:0px; top:200px;}
100% {background:red; left:0px; top:0px;}
}

@-moz-keyframes myfirst /* Firefox */
{
0%   {background:red; left:0px; top:0px;}
25%  {background:yellow; left:200px; top:0px;}
50%  {background:blue; left:200px; top:200px;}
75%  {background:green; left:0px; top:200px;}
100% {background:red; left:0px; top:0px;}
}

@-webkit-keyframes myfirst /* Safari and Chrome */
{
0%   {background:red; left:0px; top:0px;}
25%  {background:yellow; left:200px; top:0px;}
50%  {background:blue; left:200px; top:200px;}
75%  {background:green; left:0px; top:200px;}
100% {background:red; left:0px; top:0px;}
}

@-o-keyframes myfirst /* Opera */
{
0%   {background:red; left:0px; top:0px;}
25%  {background:yellow; left:200px; top:0px;}
50%  {background:blue; left:200px; top:200px;}
75%  {background:green; left:0px; top:200px;}
100% {background:red; left:0px; top:0px;}
}
#ground
{
	width: 550px;
	height: 430px;
	position: relative;
	top:-100px;
	left: 400px;
}
#ground img
{
	height:100%；
	overflow:hidden
}
#ball
{
	width:80px;
	height:80px;
	position: relative;
	top:-400px;
	left: 200px;
	float: left;
	animation:mymove 5s infinite;
	-moz-animation:mymove 5s infinite; /* Firefox */
	-webkit-animation:mymove 5s infinite; /* Safari and Chrome */
	-o-animation:mymove 5s infinite; /* Opera */
}

@keyframes mymove
{
0%   {top:-400px;transform: scale(1,1);}
33%  {top:-100px;transform: scale(1.2,1.2);}
66%  {top:-200px;transform: scale(1.08,1.08);}
100% {top:-100px;transform: scale(1.2,1.2);}
}
@-moz-keyframes mymove /* Firefox */
{
0%   {top:-400px;transform: scale(1,1);}
33%  {top:-100px;transform: scale(1.2,1.2);}
66%  {top:-200px;transform: scale(1.08,1.08);}
100% {top:-100px;transform: scale(1.2,1.2);}
}

@-webkit-keyframes mymove /* Safari and Chrome */
{
0%   {top:-400px;transform: scale(1,1);}
33%  {top:-100px;transform: scale(1.2,1.2);}
66%  {top:-200px;transform: scale(1.08,1.08);}
100% {top:-100px;transform: scale(1.2,1.2);}
}

@-o-keyframes mymove /* Opera */
{
0%   {top:-400px;transform: scale(1,1);}
33%  {top:-100px;transform: scale(1.2,1.2);}
66%  {top:-200px;transform: scale(1.08,1.08);}
100% {top:-100px;transform: scale(1.2,1.2);}
}
</style>
</head>
<body>

<p><b>注释：</b>本例在 Internet Explorer 中无效。</p>

<div id="oMove"></div>

<div id="ground">
	<img src="src/1.5.1.jpg" alt="ground" />
	<div id="ball"><img src="src/1.5.png" alt="ball" /></div>
</div>

</body>
</html>
